#ifndef __UIMIDBODY__H__
#define __UIMIDBODY__H__

#include <MZFCLIB.h>

#include	"iUiNumButton.h"
#include	"UiStatusBar.h"
#include	"iUiNumStatic.h"
#include	"UiScaleBar.h"
#include	"UiRotatePanel.h"
#include	"SHIImaging.h"

typedef enum _tagPresetChannelDisplay
{
	PRESET_CHANNEL_ONE = 0,
	PRESET_CHANNEL_TWO,
	PRESET_CHANNEL_THREE,
	PRESET_CHANNEL_FOUR,
	PRESET_CHANNEL_FIVE,
	PRESET_CHANNEL_SIX,
	MAX_PRESET_CHANNEL,
} PRESET_CHANNEL_BTN;

typedef enum _tagStaticFlagDisplay
{
	FLAG_STATIC_ST = 0,
	FLAG_STATIC_LOC,
	FLAG_STATIC_AUTO,
	FLAG_STATIC_PTY,
	MAX_FLAG_STATIC,
} PFLAG_STATIC;

class UiMidbody :
	public UiWin
{
public:
	UiMidbody();
	~UiMidbody();

	BOOL InitUiWin(void);

	void PaintWin(HDC hdc, RECT* prcWin, RECT* prcUpdate);
	virtual int OnLButtonDown(UINT fwKeys, int xPos, int yPos);
	virtual int OnLButtonUp(UINT fwKeys, int xPos, int yPos);
	virtual void DeleteImages();

	void LoadiInterItem();
	BOOL InitImages();
public:
/*****************m_BtnUiMidbody*************************************/	
//	iUiNumButton m_BtnUiMidbody[MAX_PRESET_CHANNEL];//check button
/*****************m_BtnUiMidbody*************************************/	
	UiButton	m_BtnUiMidbody[MAX_PRESET_CHANNEL];//check button	
/*****************m_BtnUiMidbody*************************************/	
/***********m_StaticNumFreq*******************************************/
//	iUiNumStatic m_StaticNumFreq;
//	iUiNumStatic m_StaticNumFlag[MAX_FLAG_STATIC];
/*********************************************************************/
	void DrawFreqValue(HDC hDC, RECT* prcWin, RECT* prcUpdate);
	void DrawFreqBand(HDC hDC, RECT* prcWin, RECT* prcUpdate);
	void DrawFreqUnit(HDC hDC, RECT* prcWin, RECT* prcUpdate);
	void DrawFreqST(HDC hDC, RECT* prcWin, RECT* prcUpdate);
	void DrawFreqLOC(HDC hDC, RECT* prcWin, RECT* prcUpdate);
	void DrawFreqAUTO(HDC hDC, RECT* prcWin, RECT* prcUpdate);
	void DrawFreqPTY(HDC hDC, RECT* prcWin, RECT* prcUpdate);

	void UpdateFreqValue(float fFreqValue);
	void UpdateFreqBand(DWORD dwBand);
	void UpdateUnit(DWORD dwFreqUnit);
	void UpdateST(BOOL bST);
	void UpdateLOC(BOOL bLOC);
	void UpdateAUTO(BOOL bAUTO);
	void UpdatePTY(BOOL bPTY);

	SHIImaging		m_FreqNumberImage[10];
	SHIImaging		m_FreqDotImage;

	SHIImaging		m_FreqBandImg[5];
	SHIImaging		m_FreqUnitImg[2];

	SHIImaging		m_FreqFlagImg[MAX_FLAG_STATIC];

	RECT			m_rtFreqValue;
	RECT			m_rtFreqBand;
	RECT			m_rtFreqUnit;
	RECT			m_rtFreqFlag[MAX_FLAG_STATIC];


	float			m_fFreqValue;
	DWORD			m_dwBand;
	DWORD			m_dwFreqUnit;
	BOOL			m_bFreqFlag[MAX_FLAG_STATIC];

//	ImagingHelper	*m_VideoMainBG;

	UiScaleBar		m_ScaleBarFM;
	UiScaleBar		m_ScaleBarAM;
	HDC				m_hBakDC;
	HBITMAP			m_hBitmapBakDC;

	UiRotatePanel	m_RotatePanel;
};

#endif